define(function(require, exports, module) {
  'use strict';

  var Search = require('../common/search/search');

  var opts = [
    '<a href="javascript:;" data-role="del" data-id="{{id}}">删除</a>'
  ];
  var search = new Search({
    url: 'logList',
    delUrl: 'logDel',
    keepHistory: false,
    dateCfg: {
      disabled: false
    },
    formCfg: {
      data: {
        groups: [{
          colspan: null,
          value: '<i class="fa fa-search"></i> 搜索',
          attrs: {
            type: 'submit'
          }
        }]
      },
      events: {
        render: function() {
        }
      }
    },
    gridCfg: {
      columns: [{
        key: 'id',
        name: '序号'
      }, {
        key: 'docCreatorName',
        name: '用户名'
      }, {
        key: 'ip',
        name: 'ip地址'
      }, {
        key: 'desc',
        name: '操作内容'
      }, {
        key: 'clientMark',
        name: '客户端标识'
      }, {
        key: 'docCreateTime',
        name: '操作时间'
      }, {
        name: '操作',
        template: opts.join('')
      }]
    },
    gridHelpers: {

    },
    events: {
      render: function() {

      }
    },
    delegates: {
      'click [data-role=view]': function() {
        window.location.href = '/admin/user/view.html';
      },
      'click [data-role=freeze]': function(e) {}
    }
  });


});
